<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroundOrderDetailBusinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ground_order_detail_busin', function (Blueprint $table) {
            $table->increments('id');
            $table->string('city_id',5)->comment('城市id');
            $table->string('group_salesman_id',11)->comment('地推人员id');
            $table->string('shop_assistant_id',11)->comment('商户地推店员id');
            $table->string('shop_id',11)->comment('商户id');
            $table->string('shop_name',100)->comment('商户名称');
            $table->string('shop_code',20)->comment('商家代码');
            $table->string('register_mobile',16)->comment('注册手机号');
            $table->string('order_number',50)->comment('订单号');
            $table->decimal('ground_total_fee',16,2)->comment('地推收入');
            $table->string('history_ground_id',20)->comment('所属地推方案id');
            $table->decimal('money',16,2)->comment('金额');
            $table->string('ground_type',5)->comment('地推类型1：个人地推 2：商家地推');
            $table->string('ground_order_type',5)->comment('地推订单状态\r\n            (1：充值，2：订单)');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('ground_order_detail_busin');
    }
}
